vector algebra: Algebra (notation) for overlaying SpatialPolygons*
Description
These funcitons are experimental. Under development!
Given SpatialPolygons* object x
and y
x+y
This is the same as merge(x, y)
x*y
This is the same as crop(x, y)
x-y
Erase the area covered by y
from x
These functions are based on functions from rgeos, with some added functionality to, among other things, avoid polygon duplication and to keep the attributes.
See Arith-methods for similar arithmetic with Raster objectsDetails
Comparison of terminology for polygon overlay methods used in ArcGIS and in this package (raster)
rll{
ArcGIS raster
dissolve aggregate
append merge(x, y, ..., intersect=FALSE)
union merge or "+"
intersect crop or "*"
erase "-"
symdif "^" (to be done)
}
To do: identity /update
For spatialjoin and other spatial queries, see sp functions 'over' and 'overlay' (or raster function extract when using Raster objects)